-
Notifications
You must be signed in to change notification settings - Fork 277
[docs] render the documentation as a website #1840
Conversation
@flynnduism looks great, would you mind rebasing. |
@shashankram will do - I'll update this PR to omit any changes to the docs markdown files, to avoid these conflicts. |
Working on these dos:
|
This is ready for review @phillipgibson
I'd recommend this PR be followed up with edits to the current documentation files at |
Codecov Report
@@ Coverage Diff @@
## main #1840 +/- ##
==========================================
+ Coverage 56.55% 56.57% +0.01%
==========================================
Files 140 140
Lines 5644 5644
==========================================
+ Hits 3192 3193 +1
+ Misses 2449 2448 -1
Partials 3 3
Continue to review full report at Codecov.
|
The addition of the Netlify bot was causing OSM pull requests to fail. #1930 This is disabled for now. If this PR is merged in, I can reactivate the integration afterwards with some limitations to avoid these issues reappearing. Steps to reactivate Netlify integration (for auto deploys, and generating previews of pull requests)
|
docs/content/_index.md
Outdated
|
||
![OSM Install Demo](https://github.com/openservicemesh/osm/raw/main/img/osm-install-demo-v0.2.0.gif "OSM Install Demo") | ||
|
||
See the [installation guide](docs/installation_guide.md) for more detailed options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link doesn't work in the preview and it seems like it wouldn't work in general - assuming this is being generated from the code repo, do we need to change it to a fully qualified URL so it can work from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this link for now so that a broken link is not introduced.
I'd like to keep this PR focused on generating the website (config and theme) and have content edits to the docs be added separately via follow up PRs & Issues. Discussed with @phillipgibson, there are edits that should happen and I think those are best handled by the OSM team, before this website be made accessible to the public.
Recommended follow-up edits:
- Create a proper landing page - the current
index.md
page referenced here is temporary (copied from the OSM readme), a tailored Docs welcome / intro is needed to best guide project users - Content needs to be reorganized - right now only 1 file exists in the
docs/content
site dir. The content should be reviewed and moved into the required structure, grouped into subsections as needed*
- Review metadata - the existing docs need Hugo frontmatter added to render properly for the web
*
I had carried out some of this work via this PR, but it was problematic as this PR is already large without any docs files edits - there were a lot of rebase conflicts from other changes in flight. This PR would in turn then cause a lot of other rebase headaches for other open PRs. Hence, I removed those edits and reduced the size of this PR.
*
The website README that is introduced in this PR provides further details on the ideal structure and the necessary front matter metadata that should be used.
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design> [docs] reinstate original docs content to resolve conflicts Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
Signed-off-by: flynnduism <dev@ronan.design>
This looks good. Question, the "feedback" thing links to "https://github.com/USERNAME/REPOSITORY/issues/new" - if we want to use that, where do we customize it with the correct repo? Also, I think there may be a formatting issue in the footer, as the CNCF statement is staying over on the left: Finally, there's something weird here: https://osm-docs.netlify.app/docs/design/readme/ - this is listed in the sidebar as Onboarding VMs (which also has another link): Other than these minor issues, I think it's pretty great. Do we merge it now and just not link it from the front page until you have all the content as desired? |
I'm fine with getting it merged to get it live and we can clean up those details you called out. |
@phillipgibson Okay! I think if you approve the changes as well, @flynnduism will be able to merge it. |
@flynnduism Once this change is merged, does it affect how new documents are added/updated by developers or is the website generation transparent? |
|
||
* built with the [Hugo](https://gohugo.io/) static site generator | ||
* custom theme uses [Docsy](https://www.docsy.dev/) as a base, with [Bootstrap](https://getbootstrap.com/) as the underlying css framework and some [OSM custom sass](https://github.com/openservicemesh/osm/pull/1840/files#diff-374e78d353e95d66afe7e6c3e13de4aab370ffb117f32aeac519b15c2cbd057aR1) | ||
* deployed to [Netlify](https://app.netlify.com/sites/osm-docs/deploys) via merges to master. (@flynnduism can grant additional access to account) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
master
main
|
||
## Deploying the site: | ||
|
||
The site auto deploys the master branch via [Netlify](https://app.netlify.com/sites/osm-docs). Once pull requests are merged the changes will appear at docs.openservicemesh.io after a couple of minutes. Check the [logs](https://app.netlify.com/sites/osm-docs/deploys) for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
master
main
{{ $gh_repo := ($.Param "github_repo") }} | ||
{{ $gh_subdir := ($.Param "github_subdir") }} | ||
{{ $gh_project_repo := ($.Param "github_project_repo") }} | ||
{{ $gh_branch := (default "master" ($.Param "github_branch")) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
master
main
This PR renders the content of the
/docs
dir as a hugo static website, deployed via Netlify.Preview url: https://osm-docs.netlify.app/
There are a few WIP pieces to be added to this, either here or in subsequent PRs...